<template xmlns="http://www.w3.org/1999/html">
  <h1>el_表单组件</h1>
  <el-form label-width="80" style="width: 700px;margin: 0 auto" >
    <el-form-item label="姓名">
      <el-input v-model="uInfo.name" placeholder="请输入用户名"></el-input>
    </el-form-item>
    <el-form-item label="密码">
      <el-input v-model="uInfo.password" placeholder="请输入密码"></el-input>
    </el-form-item>
    <el-form-item label="性别">
      <el-radio-group v-model="uInfo.sex">
        <el-radio-button label="男" value="1" ></el-radio-button>
        <el-radio-button label="女" value="0"></el-radio-button>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="地址">
      <el-select v-model="uInfo.addr" placeholder="请选择地址">
        <el-option label="北京" value="北京"></el-option>
        <el-option label="上海" value="上海"></el-option>
        <el-option label="深圳" value="深圳"></el-option>
      </el-select>
    </el-form-item >
<!--    active-text="是" inactive-text="否"-->
    <el-form-item label="是否管理员">
      <el-switch v-model="uInfo.isAdmin"  ></el-switch>
    </el-form-item>
  </el-form>
</template>

<script setup>

import {ref} from "vue";

let uInfo = ref(
    {
      name: "",
      // age: "",
      sex: "",
      addr: "",
      password: "",
      isAdmin: false
    }
);
</script>

<style scoped>

</style>